package com.example.mytransitiondemo;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.example.mytransitiondemo.Drawable.DrawableActivity;
import com.example.mytransitiondemo.MaterialDesign.MaterialDesignActivity;
import com.example.mytransitiondemo.Property.PropertyActivity;
import com.example.mytransitiondemo.Transition.TransitionActivity;
import com.example.mytransitiondemo.Tween.TweenActivity;


public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        findViewById(R.id.bt_drawable).setOnClickListener(this);
        findViewById(R.id.bt_material_design).setOnClickListener( this);
        findViewById(R.id.bt_property).setOnClickListener( this);
        findViewById(R.id.bt_transition).setOnClickListener(this);
        findViewById(R.id.bt_tween).setOnClickListener(this);//补间动画
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.bt_drawable:
                startActivity(new Intent(this, DrawableActivity.class));
                break;
            case R.id.bt_material_design:
                startActivity(new Intent(this, MaterialDesignActivity.class));
                break;
            case R.id.bt_property:
                startActivity(new Intent(this, PropertyActivity.class));
                break;
            case R.id.bt_transition:
                startActivity(new Intent(this, TransitionActivity.class));
                break;
            case R.id.bt_tween:  // 点击了补间动画，跳转到
                startActivity(new Intent(this, TweenActivity.class));
                break;
        }
    }


}